package com.crowntit.infrastructure.dao;

import com.crowntit.infrastructure.dao.po.GroupBuyOrder;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Set;

@Mapper
public interface IGroupBuyOrderDao {

    GroupBuyOrder queryGroupBuyOrderByTeamId(String teamId);

    GroupBuyOrder queryValidGroupBuyOrderByTeamId(String teamId);

    List<GroupBuyOrder> queryValidTeamsByActivityId(Long activityId);

    List<GroupBuyOrder> queryTeamProgressInTeamIds(@Param("teamIds") Set<String> teamIds);

    void insertGroupBuyOrder(GroupBuyOrder groupBuyOrder);

    int updateAddLockCountByTeamId(String teamId);

    int updateGroupBuyOrderCompleteCount(String teamId);

    int updateOrderStatus2COMPLETE(String teamId);
}
